package com.manong.bookstore.payment.feign;

import com.manong.common.utils.R;
import com.manong.bookstore.payment.entity.UserEntity;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

@FeignClient("bookstore-user")
public interface UserFeignService {

    @RequestMapping("/user/address/findUserAddress")
    public R findUserAddress(@RequestParam Map<String, Object> params);

    @RequestMapping("/user/user/info")
    public R info(@RequestParam Map<String, Object> params);

    @RequestMapping("/user/address/info/{addressId}")
    public R info(@PathVariable("addressId") Integer addressId);

    @RequestMapping("/user/user/update")
    public R update(@RequestBody UserEntity user);
}